package com.wyz.controller;

import com.wyz.mapper.GoodsTypeMapper;
import com.wyz.model.GoodsType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * @author wk
 * @desc
 * @date 2024/7/27 15:38
 */
@Controller
public class GoodeTypeController {
    @Resource
    private GoodsTypeMapper goodsTypeMapper;
    @RequestMapping("/goodsType/addGoodsType")
    public String goodsTypeAdd() {
        return "back/addgoodsType";
    }
    @RequestMapping("/goodsType/addGoodsTypeHandler")
    public String goodsTypeAddHandler(GoodsType goodsType) {
        goodsTypeMapper.insert(goodsType);
        return "redirect:/goods/getAllGoods";
    }



}
